package com.yuhanginfo.modules.web.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.yuhanginfo.common.persistence.Page;
import com.yuhanginfo.common.service.WebCrudService;
import com.yuhanginfo.modules.web.dao.WebGoodsComboDao;
import com.yuhanginfo.modules.web.entity.WebGoodsCombo;

/**
 * 商品套餐Service
 * @author lvls
 * @version 2017-11-15
 */
@Service
@Transactional(readOnly = true)
public class WebGoodsComboService extends WebCrudService<WebGoodsComboDao, WebGoodsCombo> {

	@Autowired
	private WebGoodsComboDao GoodsComboDao;
	
	public WebGoodsCombo get(String id) {
		return super.get(id);
	}
	
	public List<WebGoodsCombo> findList(WebGoodsCombo goodsCombo) {
		return super.findList(goodsCombo);
	}
	public Page<WebGoodsCombo> findPage(Page<WebGoodsCombo> page, WebGoodsCombo goodsCombo) {
		return super.findPage(page, goodsCombo);
	}
	
	@Transactional(readOnly = false)
	public void save(WebGoodsCombo goodsCombo) {
		super.save(goodsCombo);
	}
	
	@Transactional(readOnly = false)
	public void delete(WebGoodsCombo goodsCombo) {
		super.delete(goodsCombo);
	}
	
	public List<WebGoodsCombo> selectByUserId(String userId){
		return GoodsComboDao.selectByUserId(userId);
	}
}